<template>
  <div>
    <!-- 背景图 -->
    <div class="profile-page">
      <img
        class="my_bg"
        src="http://liufusong.top:8080/img/profile/bg.png"
        alt="背景图"
      />
      <div class="My_info__login">
        <div class="My_myIcon__image">
          <img
            class="My_avatar__img"
            src="http://liufusong.top:8080/img/profile/avatar.png"
            alt="icon"
          />
        </div>
        <div class="My_user__write">
          <div class="My_name__visitor">游客</div>
          <van-button type="primary" size="small" to='/login'>去登录</van-button>
        </div>
      </div>
    </div>
    <!-- 宫格 -->
    <div class="My_middle_arrange">
      <van-grid :column-num="3">
        <van-grid-item icon="star-o" text="我的收藏" to="/collection" />
        <van-grid-item icon="wap-home-o" text="我的出租" to="/admin" />
        <van-grid-item icon="underway-o" text="看房记录" to="/" />
        <van-grid-item icon="credit-pay" text="成为房主" to="/" />
        <van-grid-item icon="manager-o" text="个人资料" to="/" />
        <van-grid-item icon="service-o" text="联系我们" to="/" />
      </van-grid>
    </div>
    <!-- 底部图片 -->
    <div class="My_bottom_img">
      <img src="http://liufusong.top:8080/img/profile/join.png" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'profile_bg',
  data () {
    return {}
  },
  async created () {},
  methods: {}
}
</script>

<style lang="less" scoped>
div {
  .profile-page {
    position: relative;
    min-height: 300px;
    .my_bg {
      width: 100%;
    }
    .My_info__login {
      position: absolute;
      bottom: 0;
      left: 50%;
      background-color: #fff;
      width: 80%;
      height: 55%;
      transform: translateX(-50%);
      box-shadow: 0 0 10px 3px #ddd;
      margin: 50px auto 0;
      padding: 0 20px;
      text-align: center;
      font-size: 13px;
    }
    .My_myIcon__image {
      position: relative;
      transform: translateY(-50%);
      border-radius: 50%;
      width: 70px;
      height: 70px;
      border: 5px solid #f5f5f5;
      display: inline-block;
      box-shadow: 0 2px 2px #bdbdbd;
      .My_avatar__img {
        width: 100%;
        border-radius: 50%;
      }
    }
    .My_user__write {
      padding-top: 15px;
      .My_name__visitor {
        margin-top: -30px;
        margin-bottom: 10px;
      }
      /deep/.van-button {
        font-size: 14px;
        line-height: 28px;
        height: 28px;
      }
    }
  }
}
.My_bottom_img {
  text-align: center;
  margin-top: 10px;
  img {
    width: 92%;
  }
}
</style>
